package com.heatup.apt.common.dao;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;

import com.baomidou.framework.service.ISuperService;
import com.baomidou.mybatisplus.plugins.Page;
import com.heatup.apt.model.channer.ChannerDetailed;

/**
 * 
 * @author jixiangyun
 * 2016年11月24日 下午5:13:48
 */
@Component
public interface ChannerDetailedMapper extends ISuperService<ChannerDetailed> {
	
	/**
	 * 根据id查询渠道明细
	 * @param id
	 * @return
	 */
	ChannerDetailed queryChannerDetailedById(int id);
	
	/**
	 * 查询所有的明细
	 * @return
	 */
	List<ChannerDetailed> queryChannerDetailedAll(Map<String, Object> map);
	
	/**
	 * 根据渠道id查询该渠道下有多少个用户
	 * @return
	 */
	List<ChannerDetailed> queryChannerDetailedByChannerId(int channerId);
	
	/**
	 * 根据用户的openId查询明细
	 * @param openid
	 * @return
	 */
	ChannerDetailed queryChannerDetailedByOpendId(String openid);
	
	/**
	 * 插入渠道用户明细
	 * @param channerDetailed
	 * @return
	 */
	int insertChannerDetailed(ChannerDetailed channerDetailed);
	
	/**
	 * 新分页组件
	 * @param page
	 * @param paramsMap
	 * @return
	 */
	Page<ChannerDetailed> channerDetailedPage(Page<ChannerDetailed> page,Map<String, Object> paramsMap);
	
	/**
	 * 
	 * @param channerDetailed
	 * @return
	 */
	int updateChannerDetailed(@Param("channerDetailed")ChannerDetailed channerDetailed);
	
}
